#include "vlog/logevent.h"
#include "vlog/logeventwarp.h"
#include "vlog/logger.h"

#define VLOG_INFO(log, event) vlog::LogEventWarp(log, event).GetMessageSS()
#define RED "\033[31m" /* Red */
int main(void)
{
    std::shared_ptr<vlog::Logger> pLogger = std::make_shared<vlog::Logger>();
    pLogger->SetLogLevel(vlog::LogLevel::Level::FATAL);
    vlog::event::LogEvent::ptr pEvent(
        new vlog::event::LogEvent("123", vlog::LogLevel::Level::FATAL, __LINE__, 123, 123, 124));
    vlog::LogAppender::ptr appender(new vlog::StdOutLogAppender);
    pLogger->AddLogAppender(appender);
    VLOG_INFO(pLogger, pEvent) << "123";

    std::cout << RED << "123" << std::endl;

    return 0;
}